package com.yuanfeng.business.feign;

import com.yuanfeng.commoms.util.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

/**
 * @author Administrator
 */
@FeignClient(name = "mall-order", url = "http://localhost:8082")
public interface OrderServiceClient {

    /**
     * 更新购物车 除shopId无其他条件
     *
     * @param map
     * @return
     */
    @PostMapping("/order/userCart/updateOrderUserCar")
    ResponseResult updateOrderUserCarByMap(@RequestBody Map<String, Object> map);


    /**
     * 修改订单信息(店铺名)
     *
     * @param map
     * @return
     */
    @PostMapping("order/base/updateByMap")
    ResponseResult updateOrderBaseByMap(@RequestBody Map<String, Object> map);

    /**
     * 修改结算信息(店铺名)
     *
     * @param map
     * @return
     */
    @PostMapping("order/settlement/updateByMap")
    ResponseResult updateOrderSettlementByMap(@RequestBody Map<String, Object> map);

    /**
     * 判断店铺下是否有未完成订单
     * @param map
     * @return
     */
    @PostMapping("/order/base/updateShopByOrderInfo")
    ResponseResult updateShopByOrderInfo(@RequestBody Map<String,Object> map);
}
